<template>
  <div class="blogBodyMain-container">
    <h1>{{ blog.title }}</h1>
    <div class="aside">
      <span>日期:{{ getDate(blog.createDate) }}</span>
      <span>浏览量:{{ blog.scanNumber }}</span>
      <a href="">评论:{{ blog.commentNumber }}</a>
    </div>
    <div v-html="blog.htmlContent"></div>
  </div>
</template>

<script>
import getDate from "@/utils/getdate";
// 代码着色
import "highlight.js/styles/github.css";

export default {
  props: {
    blog: {
      type: Object,
      required: true,
    },
  },
  methods: {
    getDate,
  },
 
  
  
};
</script>

<style lang="less" scoped>
* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
}
.blogBodyMain-container {
  .aside {
    margin-top: 15px;
    font-size: 12px;
    color: gray;
    span {
      margin-right: 15px;
    }
  }
}
</style>